package classTest.HomeWorkday06;

import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

public class Test01 {
	public static void main(String[] args) {
		PrintWriter pw = null;
		try {
			pw = new PrintWriter(
					new BufferedWriter(
							new OutputStreamWriter(
									new FileOutputStream("testpw.txt"),
									"UTF-8")
					), true);

				pw.println("你好!我喜欢java!");
			System.out.println("写出完毕!");

			} catch (Exception e) {
				System.out.println("出错了!");
			}
	}
}